import request from '@/utils/request'

export function listCart(query) {
  return request({
    url: '/cart/list',
    method: 'get',
    query: query
  })
}

export function updateCart(data) {
  return request({
    url: '/cart',
    method: 'put',
    data: data
  })
}

export function addCart(data) {
  return request({
    url: '/cart',
    method: 'post',
    data: data
  })
}

export function deleteCart(cart_id) {
  return request({
    url: '/cart/' + cart_id,
    method: 'delete'
  })
}
